<?php
// Load Header
$this->set("title_for_layout", $category['NewsCategory']['name']);
echo $this->Html->css('news', 'stylesheet', array('type' => 'text/css'));

?>
<div class="main_content">
<h2 class="title"><?php echo  $category['NewsCategory']['name'] ?></h2>
<ul class="wd-product-entries">
<?php foreach ($list_news as $list_new){?>
	<li>
      <a href="<?php echo $html->url(array('plugin' => 'news', 'controller' => 'news', 'action' => 'view', $list_new['News']['alias'], $category['NewsCategory']['alias']));?>"><img class="wd-img-news" src="<?php if($list_new['News']['image']) echo $html->url('/').'files/news/'.$html->getThumbnailName($list_new['News']['image']); else echo $html->url('/files/news/no-picture.jpg');?>" alt=""/></a>
		<h4><a href="<?php echo $html->url(array('plugin' => 'news', 'controller' => 'news', 'action' => 'view', $list_new['News']['alias'], $category['NewsCategory']['alias']));?>"><?php echo $list_new['News']['title']?></a></h4>
		
		<p><?php echo $this->text->new_truncate(strip_tags($list_new['News']['description']), 240); ?></p>		
	</li>
<?php } ?>
</ul>
<?php echo $this->element('pagination/pagination', array('model' => 'News'));?>        	
</div>
<?php    
    $news_category = $this->requestAction('elements/get_news_category');
?>
<div class="right_content">
<h1 class="title"><?php echo __('TIN TỨC'); ?><h1>
<ul>
    <?php foreach($news_category as $cat): ?>
   <li <?php if(  $category['NewsCategory']['name'] == $cat['NewsCategory']['name']) echo 'class="current"'  ?>><a href="<?php echo $html->url(array('plugin' => 'news','controller' => 'news','action' => 'listnews',$cat['NewsCategory']['alias'])) ?>"><?php echo $cat['NewsCategory']['name'] ?></a></li>
    <?php endforeach;?>
</ul>
</div>